package com.hznu.ez4life;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@RestController
@SpringBootApplication  //整个boot的核心注解，目的是开启boot的自动配置
@EnableTransactionManagement //启动注解事务管理，等同于xml配置方式<tx:annotation-driven/>
@MapperScan("com.hznu.ez4life.modules.dao") //扫描mybatis的mapper接口位于com.project.dao包下
@EnableCaching //启用缓存
@EnableConfigurationProperties
public class Ez4lifeApplication {

    public static void main(String[] args) {
        System.out.println("Application start run......");
        SpringApplication.run(Ez4lifeApplication.class, args);
        System.out.println("Application run finished!");
    }

}
